export function isAccessibilityEnabled() {
    const accessibilityManager = useAccessibilityServie();
    // 获取已启用的无障碍服务列表
    const enabledServices = accessibilityManager.getEnabledAccessibilityServiceList(android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_GENERIC);
    // 遍历已启用的无障碍服务列表
    for (let i = 0; i < enabledServices.size(); i++) {
        let service = enabledServices.get(i);
        if (service.getId().startsWith(context.getPackageName())) {
            return true;
        }
    }
    return false;
}
export interface IAndroidList<T> {
    size(): number;
    get(index: number): T;
}
export interface AccessibilityServiceInfo {
    getId(): string;
}
export interface IAccessibilityService {
    getEnabledAccessibilityServiceList(t: number): IAndroidList<AccessibilityServiceInfo>
}
export function useAccessibilityServie(): IAccessibilityService {
    return context.getSystemService(android.content.Context.ACCESSIBILITY_SERVICE)
}